/**
 * catch 捕获
 */

const someAsyncThing = function () {
  return new Promise(function (resolve, reject) {
    resolve(x + 23);
  });
};

someAsyncThing()
  .catch((error) => {
    console.log('catch a error: ', error);
  })
  .then(function handleResolve(value) {
    console.log(value);
  });
